<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户注册</title>
    <link th:href="@{/static/bootstrap/css/bootstrap.min.css}" rel="stylesheet">
</head>
<body>
<div class="row justify-content-center">
    <div class="col-md-6">
        <div class="card">
            <div class="card-header">
                <h4 class="text-center">用户注册</h4>
            </div>
            <div class="card-body">
                <form th:action="@{/register}" th:object="${user}" method="post">
                    <div class="mb-3">
                        <label for="username" class="form-label">用户名</label>
                        <input type="text" class="form-control" id="username" name="username" required>
                    </div>
                    <div class="mb-3">
                        <label for="password" class="form-label">密码</label>
                        <input type="password" class="form-control" id="password" name="password" required>
                    </div>
                    <div class="d-grid gap-2">
                        <button type="submit" class="btn btn-primary">注册</button>
                    </div>
                </form>
                <div class="mt-3 text-center">
                    <span>已有账号？</span>
                    <a th:href="@{/login}">立即登录</a>
                </div>
            </div>
        </div>
    </div>
</div>
<script th:src="@{/static/bootstrap/js/bootstrap.bundle.min.js}"></script>
</body>
</html>